home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Game Cracker (Expanded Edition)
/
Game Cracker (Expanded Edition).iso
/
cracks
/
IN973824.ZIP
/
INC_CD.ASM
< prev
next >
Wrap
Assembly Source File
|
1998-07-28
|
5KB
|
138 lines
; R!SC File patcher v1.01 28-07-98
; asm stylee!!!
; Tasm inc_cd
; Tlink /t inc_cd
; run inc_cd in incoming dir
; blah blah blah
; free to a good home
.MODEL TINY
.CODE
.286
ORG 100h
start:
mov ah, 9 ;print title
mov dx, offset Mytitle
int 21h ;yah yah yah
mov dx, offset filename ;pointer to asciiz filename
mov ax, 4301h ;set file attribs
xor cx,cx ;clr them all
int 21h ; call dos int make sure we can write to the file
; cus it could ave been read only an fucked us up
mov ax, 3D02h ;Open File
mov dx, offset filename
int 21h
jnb Ok ;jump if everything ok
mov ah, 9 ;error with file
mov dx, offset error
int 21h
mov ax, 4C01h ;Exit with error
int 21h
;_______________________________________________________________
;check file size to see if were trying to patch same version
Ok:
mov bx, ax ; move file handle
mov ax, 4200h ; seek
mov cx, 0eh ; high byte ov file size
mov dx,0dbffh ; eof -1 file size 0xedc00
int 21h ; seek 1 byte b4 eof
mov ax, 3f00h ; read from file
mov cx, 03h ; read 3 many bytes
mov dx, offset readbuffer ; offset to read bytes
int 21h ;returns in ax number of bytes succsesfully read
cmp ax,1 ;if ax= 1 we have the right file size
je sizepassed ; if it were higher, files too big
; if it were lower, files too small
; if == 1 size o.k. carry on with patch
;------------------------------------------------------------------------
;file wrong size, letz get outta here!
mov ah, 9 ; print to screen
mov dx, offset error2 ; message
int 21h
mov ax, 4C01h ;Exit with error
int 21h
sizepassed:
;------------------------------------------------------------------------
;seek & write patch #1
mov ax, 4200h ;file seek
mov cx, 2 ; hi order word of offset
mov dx, 049a6h ; lo order word of offset
int 21h ;thats 0x249a6 to you and me
mov ax, 4000h ;Write to file
mov cx, 1 ;number of bytes to write
mov dx, offset BTW1
int 21h
;------------------------------------------------------------------------
;seek & write patch #2
mov ax, 4200h ;file seek
mov cx, 4
mov dx, 093a2h ;0x439a2
int 21h
mov ax, 4000h ;Write to file
mov cx, 1
mov dx, offset BTW2
int 21h
;------------------------------------------------------------------------
;seek & write patch #3
mov ax, 4200h ;file seek
mov cx, 4
mov dx, 09a92h ;0x49a92
int 21h
mov ax, 4000h ;Write to file
mov cx, 1
mov dx, offset BTW3
int 21h
;------------------------------------------------------------------------
; gwon, all done, letz go and play
mov ax, 3E00h ;Close file
int 21h
mov ah, 9 ; Show msg
mov dx, offset done
int 21h
mov ax, 4C00h ; All Done And Exit
int 21h ;l8trs/all sorted
;_______________________________________________________________
; oh, i wonder...
Mytitle db "Incoming English Version ",0dh,0ah,0dh,0ah
db " Cracked by -R!SC- With help from Static Vengeance(a txt tut) ",0dh,0ah,0dh,0ah,"$"
error db ' error: cant find file ? ',0Dh,0Ah,'$'
error2 db ' error: file wrong size, should be 973824 bytes ',0Dh,0Ah,'$'
filename db 'incoming.exe',0
done db ' Groovy! Patch Succsessful, 3 bytes changed...' , 0Dh,0Ah,'$'
BTW1 db 0ebh ;jmp /btw, BTW means Byte(s) to write
BTW2 db 0ebh ;jmp
BTW3 db 0ebh ;jmp
readbuffer db " RiSC RtL 98 HehHeh "
end start